Application programming interface and generalized network address translator for translation of transport-layer sessions

ABSTRACT

An application programming interface for translation of transport-layer sessions is presented. The system includes kernel-mode support for application-controlled network address translation and user-mode implementation of the redirect API routines. An application process may request that a network gateway modify the source and/or destination of a given network session in a manner transparent to the original source host and/or the replacement destination host. With the generalized NAT (gNAT) of the instant invention and its associated API, both the source and the destination addresses of message packets may be changed. The address changes are mapped in the gNAT, and may result in apparent sessions between different clients and servers. Depending on the protocol in use (e.g. TCP or UDP), the address translation may be made dynamically by the gNAT, under the command of the application, and take place at the kernel level.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a divisional of U.S. patent application Ser. No.10/858,754, filed Jun. 2, 2004, entitled “APPLICATION PROGRAMMINGINTERFACE AND GENERALIZED NETWORK ADDRESS TRANSLATOR FOR TRANSLATION OFTRANSPORT-LAYER SESSIONS”, which is a continuation of U.S. patentapplication Ser. No. 09/519,287, filed Mar. 6, 2000, entitled“APPLICATION PROGRAMMING INTERFACE AND GENERALIZED NETWORK ADDRESSTRANSLATOR FOR TRANSLATION OF TRANSPORT-LAYER SESSIONS”, which issued asU.S. Pat. No. 6,779,035 on Aug. 17, 2004. The entireties of theaforementioned applications are incorporated herein by reference.

TECHNICAL FIELD

This invention relates generally to network address translation and,more particularly, relates to generalized network address translationunder application program control.

BACKGROUND OF THE INVENTION

As the number of computers that needed or wanted to be connected to theInternet continued to grow, it soon became obvious that this numbercould not be accommodated by the number of available IP addresses, knownas dotted-quads. In response to this address depletion problem, a methodas illustrated in FIG. 2 was devised whereby a number of computers C1,C₂, etc. could be located on a “private” network 60 and would useprivate IP addresses 62 to communicate with each other. These private IPaddresses could be reused on other private networks since no one outsidethe private network could see these addresses. In order to allow thecomputers on the private network to communicate with other computes S₁,S2, etc. on a public network, such as the Internet 64, the privatenetwork utilizes one machine 66 to provide the gateway for all of thecomputers on the private network to reach the public network. Throughthe use of the private addresses 62 on the private network 60 and thegateway computer 66, the address depletion problem is at least slowed.

This gateway computer 66 runs a program called a network addresstranslator (NAT) that has both a private IP address 62 and a public IPaddress 68. As computers on the private network attempt to establishsessions with a server on a public network (or another private network),the NAT changes the source address 70 of the message packets 72 from theprivate address of the client computer to its public IP address. In thisway, the private IP address is not communicated on the public network.The messages all appear to have come from the public IP address of theNAT machine. The NAT maintains a mapping 74 of the translation from theprivate to the public IP address so that when messages are received fromthe public network in response as illustrated by line 76, the NAT canforward them to the proper client machine. This operation of the NAT iscompletely transparent to the client computers on the private network,i.e. they each believe that they are communicating directly with thepublic servers.

FIG. 3 illustrates this redirect capability of the NAT machine.Specifically, a client machine C₁ attempts to establish a session 78directly with public server S₁ as indicated by dashed line 80. However,when the message from C₁ is detected by the NAT 66, it dynamicallyredirects 82 the message to S₁ and changes the source address asdescribed above. The client process does not know that the NAT haschanged its messages' source address, and continues to believe that itis communicating directly with the public server. Messages from theserver S₁ are dynamically redirected 82 to the client C₁ based on themapping of the address translation. As may be seen from FIG. 4, thisaddress translation takes place at a low level, e.g. at the kernel level84 in a Window's architecture.

While the NAT has greatly alleviated the address depletion problem,especially for home and small business networks, its translation ofsource addresses is fixed within its programming. That is, thetraditional NAT does not allow any application control of the addresstranslations that it performs. Additionally, since the addresstranslation is performed on the message packets at such a low levelwithin the kernel 84, the NAT can add almost no value, other thanproviding the raw source address translation. The NAT cannot evenprovide any destination address translations. If added value is desired,such as centralized virus scanning, site blocking, white listing, etc.,a proxy must be used instead.

Traditional proxies, as illustrated in FIG. 5, are application programsexisting in the user mode 86 that serve as the interface between theprivate 60 and the public 64 network (see FIG. 6). Unlike NATs, theproxy 88 must be addressed directly by the client machines as seen inthe destination address field 90 of message packet 92, and thereforerequires that the client applications C₁, C₂, etc. be setup to operatewith a proxy 88. Many applications cannot do this, or require specificconfiguration changes to allow the use of a proxy, and therefore a proxyconfiguration may not be appropriate for all applications. When a proxyapplication 98 is used, all communications are sent to the proxy in theuser mode 86 (see FIG. 5) as illustrated by lines 94, 96. The proxy 98then determines whether and to whom to forward the communication on thepublic network. If the proxy determines that the message may be passedto a server on the public network, the proxy establishes a secondsession 100, copies the data to the second session, changes the sourceand destination address, and sends out the message (see, also FIG. 7).In operational terms as illustrated in FIG. 7, a client process C₁establishes a first session 94 with the proxy 88 requesting access to apublic server S₁. If the proxy agrees, a second session 100 isestablished with the server S₁ on the public network 64. Since allmessages must pass from the kernel-mode network transport, e.g. TCP/IP102, to the user-mode proxy 98, be copied to a second session,transferred back down to the kernel-mode driver 102, and finallytransmitted to the network for the network application's other session,a significant performance degradation occurs.

SUMMARY OF THE INVENTION

The instant invention overcomes these and other problems by providing anapplication programming interface for translation of transport-layersessions. Specifically, the inventive concepts of the instant inventionrelate to a generalized network address translator (gNAT) and associatedapplication programming interface (API) that allow both source anddestination address translations to be made under application programcontrol. This allows value to be added to the address translation.Additionally, it significantly increases the data flow speed over atraditional proxy since there is no longer a requirement that allinformation received at the kernel-mode be passed to the user-mode,copied to a second session, and passed back to the kernel-mode fortransmission.

With the generalized NAT (gNAT) of the instant invention and itsassociated API, both the source and the destination addresses of messagepackets may be changed. The address changes are mapped in the gNAT, andmay result in apparent sessions between different clients and servers.Depending on the protocol in use (e.g. TCP or UDP), the addresstranslation may be made dynamically by the gNAT, under the command ofthe application, and take place at the kernel level. This significantlyimproves the data flow of the system by short-circuiting previouslyrequired data transfer between the kernel and user modes.

As discussed above, data transfer through a traditional proxy (auser-mode application) requires that the incoming messages from a clienton a first session be transferred from the kernel-mode to the user-modeso that the proxy can deal with them. The proxy then would copy themessage to a second session, and pass it back down to the kernel-modefor transmission to the server. Likewise, information from the serverwould arrive at the kernel level, be transmitted up to the user-mode forprocessing by the proxy, be copied to the other session, and betransmitted back down to the kernel-mode for transmission back to theclient. Significant transmission delays were incurred as a result of allof these kernel-to-user-mode transitions.

The system of the instant invention eliminates, or at least greatlyreduces, this overhead performance degradation while still adding valueto the communication. Specifically, once the application, in this case aproxy, determines that a second session will be established (or a datasession), it can command the generalized NAT through the API to performan address translation at the transmission layer (kernel-mode), andtherefore eliminate the transitions between kernel and user modes. Thegeneralized NAT receives the incoming message from the client, confirmsthat it has a mapped translation, performs the address translation, andpasses the message along to the server. Since this translation occurs atthe kernel level, the data transfer performance is greatly improved.

Since the generalized NAT and associated API of the instant inventionallows for destination address translation of a message packet, anotheradvantage provided by the instant invention is server load balancing.This balancing is achieved by a server load control application thatutilizes the gNAT through its associated API to command addresstranslations away from heavily loaded servers to servers with moreavailable capacity. Dynamic load balancing is also possible, dependenton the communication protocol used for the session. That is, a TCPsession continues to address all message packets to a server onceassigned thereto since the TCP protocol is connection oriented. UDPmessages, on the other hand, may be dynamically redirected to anavailable server at the time of message delivery since UDP is messageoriented.

Additional features and advantages of the invention will be madeapparent from the following detailed description of illustrativeembodiments that proceeds with reference to the accompanying figures.

BRIEF DESCRIPTION OF THE DRAWINGS

While the appended claims set forth the features of the presentinvention with particularity, the invention, together with its objectsand advantages, may be best understood from the following detaileddescription taken in conjunction with the accompanying drawings ofwhich:

FIG. 1 is a block diagram generally illustrating an exemplary computersystem on which the present invention resides;

FIG. 2 is a network block diagram illustrating architectural andcommunicative aspects of a traditional network address translator;

FIG. 3 is an operational block diagram of a traditional network addresstranslator;

FIG. 4 is an architectural diagram illustrating a traditional networkaddress translator;

FIG. 5 is an architectural diagram illustrating a traditional proxy;

FIG. 6 is a network block diagram illustrating architectural andcommunicative aspects of a traditional proxy;

FIG. 7 is an operational block diagram of a traditional proxy;

FIG. 8 is an architectural diagram illustrating the generalized networkaddress translator and its associated application programming interfaceof the instant invention;

FIG. 9 is a functional architectural diagram of the instant invention;

FIG. 10 is an operational block diagram illustrating an aspect of theinstant invention; and

FIG. 11 is an operational block diagram illustrating server loadbalancing in accordance with the instant invention.

DETAILED DESCRIPTION OF THE INVENTION

Turning to the drawings, wherein like reference numerals refer to likeelements, the invention is illustrated as being implemented in asuitable computing environment. Although not required, the inventionwill be described in the general context of computer-executableinstructions, such as program modules, being executed by a personalcomputer. Generally, program modules include routines, programs,objects, components, data structures, etc. that perform particular tasksor implement particular abstract data types. Moreover, those skilled inthe art will appreciate that the invention may be practiced with othercomputer system configurations, including hand-held devices,multi-processor systems, microprocessor based or programmable consumerelectronics, network PCs, minicomputers, mainframe computers, and thelike. The invention may also be practiced in distributed computingenvironments where tasks are performed by remote processing devices thatare linked through a communications network. In a distributed computingenvironment, program modules may be located in both local and remotememory storage devices.

With reference to FIG. 1, an exemplary system for implementing theinvention includes a general purpose computing device in the form of aconventional personal computer 20, including a processing unit 21, asystem memory 22, and a system bus 23 that couples various systemcomponents including the system memory to the processing unit 21. Thesystem bus 23 may be any of several types of bus structures including amemory bus or memory controller, a peripheral bus, and a local bus usingany of a variety of bus architectures. The system memory includes readonly memory (ROM) 24 and random access memory (RAM) 25. A basicinput/output system (BIOS) 26, containing the basic routines that helpto transfer information between elements within the personal computer20, such as during start-up, is stored in ROM 24. The personal computer20 further includes a hard disk drive 27 for reading from and writing toa hard disk, not shown, a magnetic disk drive 28 for reading from orwriting to a removable magnetic disk 29, and an optical disk drive 30for reading from or writing to a removable optical disk 31 such as a CDROM or other optical media.

The hard disk drive 27, magnetic disk drive 28, and optical disk drive30 are connected to the system bus 23 by a hard disk drive interface 32,a magnetic disk drive interface 33, and an optical disk drive interface34, respectively. The drives and their associated computer-readablemedia provide nonvolatile storage of computer readable instructions,data structures, program modules and other data for the personalcomputer 20. Although the exemplary environment described herein employsa hard disk, a removable magnetic disk 29, and a removable optical disk31, it will be appreciated by those skilled in the art that other typesof computer readable media which can store data that is accessible by acomputer, such as magnetic cassettes, flash memory cards, digital videodisks, Bernoulli cartridges, random access memories, read only memories,and the like may also be used in the exemplary operating environment.

A number of program modules may be stored on the hard disk, magneticdisk 29, optical disk 31, ROM 24 or RAM 25, including an operatingsystem 35, one or more applications programs 36, other program modules37, and program data 38. A user may enter commands and information intothe personal computer 20 through input devices such as a keyboard 40 anda pointing device 42. Other input devices (not shown) may include amicrophone, joystick, game pad, satellite dish, scanner, or the like.These and other input devices are often connected to the processing unit21 through a serial port interface 46 that is coupled to the system bus,but may be connected by other interfaces, such as a parallel port, gameport or a universal serial bus (USB). A monitor 47 or other type ofdisplay device is also connected to the system bus 23 via an interface,such as a video adapter 48. In addition to the monitor, personalcomputers typically include other peripheral output devices, not shown,such as speakers and printers.

The personal computer 20 may operate in a networked environment usinglogical connections to one or more remote computers, such as a remotecomputer 49. The remote computer 49 may be another personal computer, aserver, a router, a network PC, a peer device or other common networknode, and typically includes many or all of the elements described aboverelative to the personal computer 20, although only a memory storagedevice 50 has been illustrated in FIG. 1. The logical connectionsdepicted in FIG. 1 include a local area network (LAN) 51 and a wide areanetwork (WAN) 52. Such networking environments are commonplace inoffices, enterprise-wide computer networks, intranets and the Internet.

When used in a LAN networking environment, the personal computer 20 isconnected to the local network 51 through a network interface or adapter53. When used in a WAN networking environment, the person computer 20typically includes a modem 54 or other means for establishingcommunications over the WAN 52. The modem 54, which may be internal orexternal, is connected to the system bus 23 via the serial portinterface 46. In a networked environment, program modules depictedrelative to the personal computer 20, or portions thereof, may be storedin the remote memory storage device. It will be appreciated that thenetwork connections shown are exemplary and other means of establishinga communications link between the computers may be used.

In the description that follows, the invention will be described withreference to acts and symbolic representations of operations that areperformed by one or more computer, unless indicated otherwise. As such,it will be understood that such acts and operations, which are at timesreferred to as being computer-executed, include the manipulation by theprocessing unit of the computer of electrical signals representing datain a structured form. This manipulation transforms the data or maintainsit at locations in the memory system of the computer, which reconfiguresor otherwise alters the operation of the computer in a manner wellunderstood by those skilled in the art. The data structures where datais maintained are physical locations of the memory that have particularproperties defined by the format of the data. However, while theinvention is being described in the foregoing context, it is not meantto be limiting as those of skill in the art will appreciate that variousof the acts and operation described hereinafter may also be implementedin hardware.

In accordance with the invention, generalized network addresstranslation functionality is provided to application processes 104 bythe architecture illustrated in FIG. 8. This functionality includeskernel-mode support for application-controlled network addresstranslation through the generalized network address translator (gNAT)106, and user-mode implementation of these redirect applicationprogramming interface (API) 108 routines. In this way, the system of theinstant invention allows an application process 104 to request that anetwork gateway modify the source and/or destination address of a givennetwork session in a manner transparent to the original source hostand/or the replacement destination host. This ability made available bythe instant invention allows true application-controlled arbitraryredirection on network sessions. While the application process 104 isillustrated in the user-mode, it should be recognized by those skilledin the art that the invention is not so limited to only user-modeapplications. Indeed, a network application 104 using the services ofthe gNAT 106 may reside in kernel-mode. In such a situation, the API 108would also exist in the kernel-mode, and such a situation is within thescope of the instant invention.

By generalizing the operation of network address translation and puttingthat operation under application 104 control, the system of the instantinvention allows network applications 104 to achieve a number ofbenefits. For instance, server applications 104 can use the applicationprogramming interface 108 to make a group of servers appear to clientsas a single server at a single IP address as will be described morefully below with reference to FIG. 11. This functionality may also beused to redirect sessions to support migration of services for enhancedavailability. This functionality is unique to the system of the instantinvention in that the application programming interface 108 allowsserver applications 104 to gain explicit control over the translationperformed by the gNAT 106.

Further, as described above with reference to the traditional proxy,network applications that transfer information between separate networksessions typically suffer performance degradation. As discussed, this isbecause the network data must be received from the network for one ofthe network application's sessions, delivered to the user-mode networkapplication by the kernel-mode network transport, read by the networkapplication, written to the network application's other session,transferred to the kernel-mode driver, and transmitted to the networkfor the network application's other session. Instead of taking the abovesteps to copy data from one network session to another, the applicationprogramming interface 108 allows such network applications 104 toinstruct the network gateway or generalized NAT (gNAT) 106 to translateone network session into another.

As may be seen from the architectural diagram of FIG. 8, the system ofthe instant invention comprises a kernel-mode translation module 106that processes packets received from the network and modifies thosepackets in real-time, and a user-mode application programming module 108that implements the interface invoked by network applications 104. Thekernel-mode translation module 106 performs the functions of ageneralized network address translator (gNAT). This module 106 isimplemented in a preferred embodiment as a Windows 2000 driver thatregisters itself as a firewall driver with the Windows 2000 TCP/IPdriver 110. Of course, one skilled in the art will readily appreciatethat this module may also be adapted to operate in other operatingsystems without undue experimentation and without departing from thescope and spirit of the instant invention. Therefore, these alternateembodiments are hereby reserved. In its registration, the module 106supplies an entry-point that is called by the TCP/IP driver 110 uponreception of every incoming packet and before transmission of everyoutgoing packet. This ensures that all packets will be observed by thekernel-mode translation module 106 before being sent, received, orforwarded.

Each application-requested translation is recorded by the kernel-modetranslation module 106 as a redirect. Such a redirect consists of adescription of the session to be translated, along with a description ofthe translation to be performed. For example, the description of thetranslation may state that when a session is detected with sourceaddress S and destination address D, translate it so that the sourceaddress becomes S′ and the destination address becomes D′. When themodule 106 detects any new network session, it determines whether thereis a redirect that applies to the session. If the module 106 determinesthat there is a redirect for this session, the redirect is activated.The network session is automatically translated and a mapping is createdto ensure that the same translation is done for all packets in thesession. The normal processing is then continued on the session'stranslated packets, causing them to be delivered locally or forwardeddepending on the new source and destination.

The user-mode application programming module 108 is also preferablyimplemented as a Windows 2000 library that is loaded by networkapplications 104. As with the above, the invention is not so limited toa particular operating system, but is applicable to any operating systemwhich allows network communication. Therefore, the exemplary embodimentsdescribed herein are by way of illustration and not by way oflimitation. A network application 104 calls the library 108 toinitialize the kernel-mode translation module 106, and then creates oneor more redirects for the network sessions to be translated.

In a preferred embodiment, the library 108 provides routines to performat least the initializing and shutting down of the library. Theinitialization ensures that the kernel-mode translation module 106 isloaded and registered in preparation for translating network sessions.The shutting down of the library concludes the application's use of thekernel-mode translation module, which may be unloaded if it has no otherclients. Further, the library 108 also includes routines for creating aredirect for a network session. This operation supplies informationidentifying a network session, along with information describing thetranslation to be done for the network session. A network session isidentified by its protocol, its source IP address, its source port, itsdestination IP address, and its destination port. The protocol indicatesthe transport-layer protocol of the network session, which may be eitherTCP or UDP. The source IP address indicates the IP address of thenetwork session's source host, and the source port indicates the portnumber of the network session's source host. The destination IP addressindicates the IP address of the network session's destination host, andits destination port indicates the port number of the network session'sdestination host. The translation to be done for the network session mayreplace any of the last four parameters, however the transport-layerprotocol cannot be changed. Finally, the library provided routines tocancel a redirect for a network session. This operation revokes aprevious translation-request issued by the application 104.

The operation of translating network sessions at the transport-layer isillustrated in FIG. 9 to which specific reference is now made. Uponestablishment of a network session by the receipt of network data onsession line 112, the data is communicated to the network application104. Upon processing by the network application 104, this initial datais copied to a second session 114, and transmitted to the network by thedriver 110. This initial operation is much like a traditional proxy,except that the gNAT 106 may transparently redirect the data to thenetwork application 104 if the client process is not aware of thenetwork application. Unlike a traditional proxy, the network application104 is now able to utilize the API 108 to command (illustrated by line116) a dynamic redirect so that further data transitions fromkernel-mode to user-mode are no longer required. This establishes afast-path for proxy-like applications in which datagrams must be copiedfrom one session to another. This fast-path transfer is ideal for datastreaming applications, on-line gaming, multi-party conferencing, etc.

Once the network application 104 has determined that a dynamic redirectis appropriate and such has been commanded of the gNAT 106, itestablishes a dynamic redirect mapping 118. All network data that isreceived from the network for the proper network application's session(as determined by the gNAT 106 in accordance with its commanded dynamicredirect 118) is automatically translated by the gNAT 106 so that itstransport-layer address matches the network application's other session.This data is then transmitted to the network for the networkapplication's other session. Graphically, this dynamic redirection atthe transport layer is illustrated by line 120. As may be seen from line120, the communication of the data to the network server no longerrequires that the data go through two kernel-user mode translations,i.e. the trip to the application 104 is short circuited. Likewise,return data on line 122 may also be dynamically redirected to the clientif so commanded by the network application 104. The approach allows suchapplications to achieve a considerable improvement in their performance.

This performance improvement becomes vividly apparent if the initialcommunication on line 112 opens an ftp control session carrying an ftpget file request. Under a traditional proxy scenario, the ftp datachannel created to receive the file requested would first be passed fromthe kernel-mode to the user-mode to the proxy, and then would be passedback down to the kernel-mode to be forwarded to the client. As may wellbe imagined, this process incurs significant performance degradation,especially if the file is quite large. Under the system of the instantinvention, however, the network application 104 may open a data sessionwhich does not require any transitions to the user-mode by commanding adynamic redirection at the transport-layer. Now, as the data is receivedfrom the ftp server, the gNAT 106 performs the dynamic redirection inaccordance with the application's command. The destination address ofthe data is simply translated and passed to the client as indicated byline 122. Significant performance improvement is achieved in this way.

The system of the instant invention also allows session payload editing.Certain applications include addressing information within the datastreams of their sessions. For instance, many streaming applications usea control session to establish a secondary data session similar to thatdescribed above. This poses a problem for a traditional NAT in itsprimary application, i.e. transparent sharing of a single Internetconnection among multiple machines. When running on clients that aresharing a connection, such applications would send private, unreachableaddressing information to remote peers, and the latter would be unableto respond to the clients' requests. To solve this problem, the systemof the instant invention supports an extensible means of modifying asession's application-layer data in flight, beyond the modificationsmade to the session's network-layer and transport-layer addressinginformation. Extensibility is achieved by allowing third-party driversto inspect the application-layer data in each packet received for asession, and to edit the application data in each packet. These editorsregister themselves with the gNAT of the instant invention as handlersfor a specific TCP/UDP port number, and are henceforth invoked for eachmessage translated in matching sessions.

In operational terms, the dynamic redirection made available by thesystem of the instant invention is illustrated in FIG. 10. A client C₁may wish to establish a session with server S₁ by addressing messagesthereto. This is the apparent session from the client C₁'s point ofview, as illustrated by the dashed line 124. However, when the messagefrom C₁ addressed to S₁ is detected by the gNAT machine 126, it checksto determine if a dynamic redirect exists for such a session. Asillustrated in FIG. 10, a dynamic redirect 128 does exist. This dynamicredirect 128 may include a translation of both the source anddestination addresses such that the messages are actually forwarded toserver S₂ with an indication that the source was C₂. From the serverS₂'s point of view, an apparent session 130 has been established betweenS₂ and C₂. The actual session 132 that has been established is betweenC₁ and S₂, although neither C₁ nor S₂ knows that this is the case. Eachof the required translations is accomplished transparently.

An application of this transparent redirection of destination addressesis illustrated in FIG. 11 in a multiple server environment. Asintroduced above, server load balancing may be achieved through thedynamic redirection of the destination addresses based on the protocolof the session, i.e. TCP or UDP. Obviously, since TCP sessions areconnection based these sessions cannot be dynamically redirected toanother server once established if that server becomes overloaded.However, since UDP messages are not connection based, each UDP messagemay be dynamically redirected upon receipt to an available (lightlyloaded) server. The determination of the dynamic redirect to maintainload balancing of the various servers is made by a director or serverload balancing application 134. Information 136 is actively collectedfrom each of the servers, or is maintained internally to the application134 based on prior redirections. This information on server loading isused to control the redirections to maintain balance of server loading.This redirection may be based on a number of factors and on differentcriteria. For example, the dynamic redirection may be based on thenumber of clients served by a server, the processing load being handledby the server regardless of the number of clients served thereby, thetype of service required (FTP, HTTP, etc.), priority servicing based onmembership, access control, etc.

By using the term balance it is not meant that perfect equality ofprocessing capacity be maintained among all servers. Indeed, it may notbe possible to achieve perfect equality, e.g. in a situation where thereis one heavy user, and a two light users on a network with four or moreservers. In this situation, at least one server will be basicallyunloaded, one will be heavily loaded, and one or two will be servicingthe light users. However, even in this situation, if the dynamicredirection is operating to prevent all of the requests from going toone server, the system is performing server load balancing as usedherein. In the illustration of FIG. 11, a client C₁ wishes to establisha session with server S₁. However, the server load balancing application134 has determined that server S₁ is loaded, and that a dynamic redirect138 to server S₃ should be established. The gateway machine 140dynamically redirects the session transparently to server S₃ to maintainload balance.

All of the references cited herein, including patents, patentapplications, and publications, are hereby incorporated in theirentireties by reference.

In view of the many possible embodiments to which the principles of thisinvention may be applied, it should be recognized that the embodimentdescribed herein with respect to the drawing figures is meant to beillustrative only and should not be taken as limiting the scope ofinvention. For example, those of skill in the art will recognize thatthe elements of the illustrated embodiment shown in software may beimplemented in hardware and vice versa or that the illustratedembodiment can be modified in arrangement and detail without departingfrom the spirit of the invention. Therefore, the invention as describedherein contemplates all such embodiments as may come within the scope ofthe following claims and equivalents thereof.

1. A method for facilitating message packet communication between afirst application having an internal address valid in an internaladdress realm and one or more applications in an external address realm,said internal address realm having available to it a set of addressesvalid for use in the external address realm, comprising: providing theinternal address realm with a network address translation device havingan address translator for translating addresses included in the headersof message packets incoming to and outgoing from the internal addressrealm in accordance with translation rules that resolve theincompatibility of the internal and external address realms; providingan address manager for establishing and storing the translation rules,said address manager having access to the set of available addressesvalid for use in the external address realm; and providing a controlchannel communicating with the address manager for receiving from thefirst application a service request message for establishing in responseto the first application's service request a translation rule specifiedby the first application, wherein the address manager transmits to thefirst application in response to the service request a first addressvalid for use in the external address realm and wherein the firstapplication causes the first address to be transmitted to the externaladdress realm in an SIP message.
 2. The method of claim 1, wherein theSIP message is an SIP INVITE message.
 3. The method of claim 1, whereinthe first application causes the SIP message to be transmitted to asecond application in the external address realm.
 4. The method of claim1, wherein the first address includes an IP address and a port number.5. The method of claim 1, wherein an SIP proxy server is invoked intransmitting the SIP message to a second application in the externaladdress realm.
 6. The method of claim 1, wherein the SIP message is usedto establish a peer-to-peer communication session.
 7. The method ofclaim 1, wherein the SIP message is used to establish an IP telephoniccommunication session.
 8. The method of claim 1, wherein the SIP messageis used to establish an instant messaging session.